<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

@extends('index')
@section('title', $title ?? '未命名')

@section('body')
@parent

{{-- 头部 --}}
{{--
<header>
    @include('home.header')
</header>
--}}

{{-- 主体 --}}
{{--
<main class="container-fluid">
    @include('admin.main')
</main>
--}}
<div class="container mt-5">
    <div class="row">
        <form class="col-12" method="POST" action="/update">
            <div class="form-group" hidden>
                <input type="text" class="form-control" id="exampleInputAid" name="aid"
                       value="{{ $article->aid }}" hidden>
            </div>

            <div class="form-group">
                <label>文章Aid</label>
                <input type="text" class="form-control"
                       value="{{ $article->aid }}" placeholder="自动增长" disabled>
            </div>
            <div class="form-group">
                <label for="exampleInputimg1">展示图片</label>
                <input type="text" class="form-control" id="exampleInputimg1" name="img"
                       value="{{ $article->img }}" placeholder="url地址或相对地址">
            </div>
            <div class="form-group">
                <label for="exampleInputimgalt1">展示图片Alt</label>
                <input type="text" class="form-control" id="exampleInputimgalt1" name="img_alt"
                       value="{{ $article->img_alt }}" placeholder="文本">
            </div>
            <div class="form-group">
                <label for="exampleInputTitle1">标题</label>
                <input type="text" class="form-control" id="exampleInputTitle1" name="title1"
                       value="{{ $article->title }}">
            </div>
            <div class="form-group">
                <label for="exampleInputTitle2">副标题</label>
                <input type="text" class="form-control" id="exampleInputTitle2" name="title2"
                       value="{{ $article->title2 }}">
            </div>
            <div class="form-group">
                <label for="exampleTextareaContent1">内容</label><br>
                <textarea class="form-control" name="content" id="exampleTextareaContent1" cols="30" rows="10">{{ $article->content }}</textarea>
                <small id="content" class="form-text text-muted">支持MD语法.</small>
            </div>
            <button type="submit" class="btn btn-primary">保存并提交</button>
        </form>
    </div>
</div>


@endsection